#include <stdlib.h>
#include <stdio.h>

int main(int argc,char *argv[])
{
	FILE *f;

	typedef struct person {
		char *name;
		int age;
	} person;

	person nicu,claudiu;

	nicu.name = "Nicu";
	nicu.age = 26;

	claudiu.name = "Claudiu";
	claudiu.age=31;

	f = fopen("test.dat","wb");

	fwrite(&nicu,1,sizeof(person), f);

	fclose(f);

	person buf;
	f = fopen("test.dat","rb");
		fread(&buf,sizeof(buf),1,f);
	fclose(f);

	printf("%s",buf.name);

	return 0;
}

int add(int a,int b) {
	return (a+b);
}

int sub(int a,int b) {
	return (a-b);
}
